
from django.contrib.auth.mixins import AccessMixin,LoginRequiredMixin
from django.http import JsonResponse
class LoginRequiredJSONMixin(LoginRequiredMixin):
    def handle_no_permission(self):#重写父类方法
        return JsonResponse({'code':400,'errmsg':'请登录'})
